package com.java2207.group1.service.impl;

import com.java2207.group1.common.LayuiPageVo;
import com.java2207.group1.mapper.DepartmentMapper;
import com.java2207.group1.pojo.Department;
import com.java2207.group1.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author HLJ
 * @Date 2022/7/26 07
 */
@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public LayuiPageVo<Department> selectList() {

        List<Department> list = departmentMapper.selectList();

        LayuiPageVo<Department> vo = new LayuiPageVo<>();
        vo.setCode(0);
        vo.setData(list);
        return vo;
    }

    /**
     *
     */
    @Override
    public void updateDeparmentNum() {
        departmentMapper.updateDeparmentNum();
    }

    @Override
    public List<Department> selectDepartment() {
        return departmentMapper.selectDepartment();
    }


}
